{template 'common/header'}
<ul class="nav nav-tabs">
	<li {if $type==1}class="active"{/if}><a href="{php echo url('activity/exchange/trade', array('type'=>1));}">折扣券兑换记录</a></li>
	<li {if $type==2}class="active"{/if}><a href="{php echo url('activity/exchange/trade', array('type'=>2));}">代金券兑换记录</a></li>
	<li {if $type==3}class="active"{/if}><a href="{php echo url('activity/exchange/trade', array('type'=>3));}">物品真实兑换记录</a></li>
	<!-- 
	<li {if $type==4}class="active"{/if}><a href="{php echo url('activity/exchange/trade', array('type'=>4));}">虚拟物品兑换记录</a></li>
	 -->
	<li {if $type==5}class="active"{/if}><a href="{php echo url('activity/exchange/trade', array('type'=>5));}">活动参与次数兑换记录</a></li>
</ul>
<div class="main">
	<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="activity">
			<input type="hidden" name="a" value="exchange">
			<input type="hidden" name="do" value="trade">
			<input type="hidden" name="type" value="{$type}" />
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户UID</label>
					<div class="col-sm-6 col-lg-8">
						<input class="form-control" name="uid" id="" type="text" value="{$_GPC['uid']}">	
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖日期</label>
					<div class="col-sm-6 col-lg-8">
						{php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d', $starttime),'endtime'=>date('Y-m-d', $endtime)));}
					</div>
					<div class="pull-right col-xs-12 col-sm-3 col-lg-2">
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="table-responsive">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:80px; text-align:center;">uid</th>
					<th style="width:100px; text-align:center;">姓名</th>
					<th style="width:150px; text-align:center;">标题</th>
					<th style="width:150px; text-align:center;">图标</th>
					<th style="width:100px; text-align:center;">兑换类型</th>
					<th style="width:200px; text-align:center;">兑换物品</th>
					<th style="width:200px; text-align:center;">兑换时间</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $item}
				<tr>
					<td class="text-center">{$item['uid']}</td>
					<td class="text-center"{$item['realname']}</td>
					<td class="text-center">{$item['extra']['title']}</td>
					<td class="text-center"><img src="{$item['extra']['thumb']}" style="max-width:50px; max-height: 30px;"></td>
					<td class="text-center">{php echo activity_type_title($item['extra']['type']);}</td>
					<td class="text-center">{$item['extra']['extra']['title']}</td>
					<td class="text-center">{php echo date('Y-m-d H:i', $item['createtime'])}</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		{$pager}
	</div>
</div>
{template 'common/footer'}